package cn.com.cfae.iras.doc.analyze.parse.model;


import cn.com.cfae.iras.doc.analyze.parse.kv.TextLayout;

import java.util.ArrayList;
import java.util.List;

/**
 * 1、表格体系二级标题
 * 2、表格体系二级以下标题，后续标题不好区分，只能先作为三级标题了
 */
public class SectionModel {

    int startPage;
    int endPage;
    String title;
    String content;

    public List<SectionModel> getChildSectionModelList() {
        return childSectionModelList;
    }

    public void setChildSectionModelList(List<SectionModel> childSectionModelList) {
        this.childSectionModelList = childSectionModelList;
    }

    List<SectionModel> childSectionModelList;

    SectionModel parent;

    TextLayout textLayout;

    public SectionModel() {
    }

    public int getStartPage() {
        return startPage;
    }

    public void setStartPage(int startPage) {
        this.startPage = startPage;
    }

    public int getEndPage() {
        return endPage;
    }

    public void setEndPage(int endPage) {
        this.endPage = endPage;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    

    public SectionModel getParent() {
        return parent;
    }

    public void setParent(SectionModel parent) {
        this.parent = parent;
    }

    public TextLayout getTextLayout() {
        return textLayout;
    }

    public void setTextLayout(TextLayout textLayout) {
        this.textLayout = textLayout;
    }

    public void addChildSectionModel(SectionModel childSectionModel) {
        if(childSectionModelList==null){
            childSectionModelList = new ArrayList<>();
        }
        childSectionModelList.add(childSectionModel);
    }
}
